Hypervisor virtualization of OS console and operator panel

ABSTRACT

A logically partitioned data processing system in which shared resources are emulated to provide each partition a separate copy of the shared resource is provided. In one embodiment, the logically partitioned data processing system includes a plurality of logical partitions, a plurality of operating systems executing within the data processing system and a plurality of assignable resources. Each of the plurality of operating systems is assigned to a separate one of the plurality of logical partitions, such that no more than one operating system is assigned to any given logical partition. Each of the plurality of assignable resources is assigned to a single one of the plurality of logical partitions. The logically partitioned data processing system also includes a hypervisor. The hypervisor emulates shared resources, such as an operator panel and a system console, and provides a virtual copy of these shared resources to each of the plurality of logical partitions.

This application is a divisional of application Ser. No. 10/735,403,filed Dec. 12, 2003, now U.S. Pat. No. 7,100,163, status allowed, whichis herein incorporated by reference.

BACKGROUND OF THE INVENTION

1. Technical Field

The present invention relates generally to the field of computerarchitecture and, more specifically, to methods and systems for allowingmultiple operating system images within a logically partitioned dataprocessing system to interact with a console and operator panel.

2. Description of Related Art

A logical partitioning option (LPAR) within a data processing systemallows multiple copies of a single operating system (OS) or multipleheterogeneous operating systems to be simultaneously run on a singledata processing system platform. A partition, within which an operatingsystem image runs, is assigned a non-overlapping sub-set of theplatform's resources. These platform allocable resources include one ormore architecturally distinct processors with their interrupt managementarea, regions of system memory, and I/O adapter bus slots. Thepartition's resources are represented by its own open firmware devicetree to the OS image.

Each distinct OS or image of an OS running within the platform areprotected from each other such that software errors on one logicalpartition cannot affect the correct operation of any of the otherpartitions. This is provided by allocating a disjoint set of platformresources to be directly managed by each OS image and by providingmechanisms for ensuring that the various images cannot control anyresources that have not been allocated to it. Furthermore, softwareerrors in the control of an OS's allocated resources are prevented fromaffecting the resources of any other image. Thus, each image of the OS(or each different OS) directly controls a distinct set of allocableresources within the platform.

There are certain resources within many server platforms that existsingly, yet each distinct OS within the platform must interact withthese resources. For example, the RS/6000, a product of InternationalBusiness Machines Corporation of Armonk, N.Y., includes a console and anoperator panel for allowing a system administrator to detect and correctproblems within the platform. However, each of these resources existssingly within the platform and it is impractical to duplicate theseresources. While present architectures often do not preclude the sharingof allocable resources of this type between partitions, there is nocurrent architectural support for such sharing. Therefore, a method,system, and computer program product for providing the sharing ofallocable resources within a logically partitioned platform isdesirable.

SUMMARY OF THE INVENTION

The present invention provides a logically partitioned data processingsystem in which shared resources are emulated to provide each partitiona separate copy of the shared resource. In one embodiment, the logicallypartitioned data processing system includes a plurality of logicalpartitions, a plurality of operating systems executing within the dataprocessing system and a plurality of assignable resources. Each of theplurality of operating systems is assigned to a separate one of theplurality of logical partitions, such that no more than one operatingsystem is assigned to any given logical partition. Each of the pluralityof assignable resources is assigned to a single one of the plurality oflogical partitions. The logically partitioned data processing systemalso includes a hypervisor. The hypervisor emulates shared resources,such as an operator panel and a system console, and provides a virtualcopy of these shared resources to each of the plurality of logicalpartitions.

BRIEF DESCRIPTION OF THE DRAWINGS

The novel features believed characteristic of the invention are setforth in the appended claims. The invention itself, however, as well asa preferred mode of use, further objectives and advantages thereof, willbest be understood by reference to the following detailed description ofan illustrative embodiment when read in conjunction with theaccompanying drawings, wherein:

FIG. 1 depicts a pictorial representation of a distributed dataprocessing system in which the present invention may be implemented;

FIG. 2, a block diagram of a data processing system in accordance withthe present invention is illustrated;

FIG. 3 depicts a block diagram of a data processing system, which may beimplemented as a logically partitioned server, in accordance with thepresent invention;

FIG. 4 depicts a block diagram illustrating a prior art logicallypartitioned platform in accordance with the present invention;

FIG. 5 depicts a block diagram of a logically partitioned platform inwhich the present invention may be implemented;

FIGS. 6A-6B depict high-level flowcharts illustrating exemplaryprocesses, performed for example, in hypervisor 510, for emulating aconsole and operator platform in accordance with the present invention;

FIG. 7 depicts a high level flowchart illustrating an exemplary processon a hardware system console for presenting the information from thevarious OS images to an operator in accordance with the presentinvention; and

FIG. 8 depicts a high level flowchart illustrating an exemplary processon a hardware system console for sending messages to various ones ofmultiple OS images running on a logically partitioned platform inaccordance with the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

With reference now to the figures, and in particular with reference toFIG. 1, a pictorial representation of a distributed data processingsystem is depicted in which the present invention may be implemented.

Distributed data processing system 100 is a network of computers inwhich the present invention may be implemented. Distributed dataprocessing system 100 contains network 102, which is the medium used toprovide communications links between various devices and computersconnected within distributed data processing system 100. Network 102 mayinclude permanent connections, such as wire or fiber optic cables, ortemporary connections made through telephone connections.

In the depicted example, server 104 is connected to hardware systemconsole 150. Server 104 is also connected to network 102, along withstorage unit 106. In addition, clients 108, 110 and 112 are alsoconnected to network 102. These clients, 108, 110 and 112, may be, forexample, personal computers or network computers. For purposes of thisapplication, a network computer is any computer coupled to a networkthat receives a program or other application from another computercoupled to the network. In the depicted example, server 104 is alogically partitioned platform and provides data, such as boot files,operating system images and applications, to clients 108-112. Hardwaresystem console 150 may be a laptop computer and is used to displaymessages to an operator from each operating system image running onserver 104, as well as to send input information, received from theoperator, to server 104. Clients 108, 110 and 112 are clients to server104. Distributed data processing system 100 may include additionalservers, clients, and other devices not shown. Distributed dataprocessing system 100 also includes printers 114, 116 and 118. A client,such as client 110, may print directly to printer 114. Clients such asclient 108 and client 112 do not have directly attached printers. Theseclients may print to printer 116, which is attached to server 104, or toprinter 118, which is a network printer that does not require connectionto a computer for printing documents. Client 110, alternatively, mayprint to printer 116 or printer 118, depending on the printer type andthe document requirements.

In the depicted example, distributed data processing system 100 is theInternet, with network 102 representing a worldwide collection ofnetworks and gateways that use the TCP/IP suite of protocols tocommunicate with one another. At the heart of the Internet is a backboneof high-speed data communication lines between major nodes or hostcomputers consisting of thousands of commercial, government, education,and other computer systems that route data and messages. Of course,distributed data processing system 100 also may be implemented as anumber of different types of networks such as, for example, an intranetor a local area network.

FIG. 1 is intended as an example and not as an architectural limitationfor the processes of the present invention.

With reference now to FIG. 2, a block diagram of a data processingsystem in accordance with the present invention is illustrated. Dataprocessing system 200 is an example of a hardware system console, suchas hardware system console 150 depicted in FIG. 1. Data processingsystem 200 employs a peripheral component interconnect (PCI) local busarchitecture. Although the depicted example employs a PCI bus, other busarchitectures, such as Micro Channel and ISA, may be used. Processor 202and main memory 204 are connected to PCI local bus 206 through PCIbridge 208. PCI bridge 208 may also include an integrated memorycontroller and cache memory for processor 202. Additional connections toPCI local bus 206 may be made through direct component interconnectionor through add-in boards. In the depicted example, local area network(LAN) adapter 210, SCSI host bus adapter 212, and expansion businterface 214 are connected to PCI local bus 206 by a direct componentconnection. In contrast, audio adapter 216, graphics adapter 218, andaudio/video adapter (A/V) 219 are connected to PCI local bus 206 byadd-in boards inserted into expansion slots. Expansion bus interface 214provides a connection for a keyboard and mouse adapter 220, modem 222,and additional memory 224. In the depicted example, SCSI host busadapter 212 provides a connection for hard disk drive 226, tape drive228, CD-ROM drive 230, and digital video disc read only memory drive(DVD-ROM) 232. Typical PCI local bus implementations will support threeor four PCI expansion slots or add-in connectors.

An operating system runs on processor 202 and is used to coordinate andprovide control of various components within data processing system 200in FIG. 2. The operating system may be a commercially availableoperating system, such as OS/2, which is available from InternationalBusiness Machines Corporation. “OS/2” is a trademark of InternationalBusiness Machines Corporation. An object-oriented programming system,such as Java, may run in conjunction with the operating system,providing calls to the operating system from Java programs orapplications executing on data processing system 200. Instructions forthe operating system, the object-oriented operating system, andapplications or programs are located on a storage device, such as harddisk drive 226, and may be loaded into main memory 204 for execution byprocessor 202.

Those of ordinary skill in the art will appreciate that the hardware inFIG. 2 may vary depending on the implementation. For example, otherperipheral devices, such as optical disk drives and the like, may beused in addition to or in place of the hardware depicted in FIG. 2. Thedepicted example is not meant to imply architectural limitations withrespect to the present invention. For example, the processes of thepresent invention may be applied to multiprocessor data processingsystems.

With reference now to FIG. 3, a block diagram of a data processingsystem, which may be implemented as a logically partitioned server, suchas server 104 in FIG. 1, is depicted in accordance with the presentinvention. Data processing system 300 may be a symmetric multiprocessor(SMP) system including a plurality of processors 301, 302, 303, and 304connected to system bus 306. For example, data processing system 300 maybe an IBM RS/6000, a product of International Business MachinesCorporation in Armonk, N.Y. Alternatively, a single processor system maybe employed. Also connected to system bus 306 is memory controller/cache308, which provides an interface to a plurality of local memories360-363. I/O bus bridge 310 is connected to system bus 306 and providesan interface to I/O bus 312. Memory controller/cache 308 and I/O busbridge 310 may be integrated as depicted.

Data processing system 300 is a logically partitioned data processingsystem. Thus, data processing system 300 may have multiple heterogeneousoperating systems (or multiple instances of a single operating system)running simultaneously. Each of these multiple operating systems mayhave any number of software programs executing within in it. Dataprocessing system 300 is logically partitioned such that different I/Oadapters 320-321, 328-329, 336-337, and 346-347 may be assigned todifferent logical partitions.

Thus, for example, suppose data processing system 300 is divided intothree logical partitions, P1, P2, and P3. Each of I/O adapters 320-321,328-329, and 336-337, each of processors 301-304, and each of localmemories 360-363 is assigned to one of the three partitions. Forexample, processor 301, memory 360, and I/O adapters 320, 328, and 329may be assigned to logical partition P1; processors 302-303, memory 361,and I/O adapters 321 and 337 may be assigned to partition P2; andprocessor 304, memories 362-363, and I/O adapters 336 and 346-347 may beassigned to logical partition P3.

Each operating system executing within data processing system 300 isassigned to a different logical partition. Thus, each operating systemexecuting within data processing system 300 may access only those I/Ounits that are within its logical partition. Thus, for example, oneinstance of the Advanced Interactive Executive (AIX) operating systemmay be executing within partition P1, a second instance (image) of theAIX operating system may be executing within partition P2, and a Windows2000™ operating system may be operating within logical partition P1.Windows 2000 is a product and trademark of Microsoft Corporation ofRedmond, Wash.

Peripheral component interconnect (PCI) Host bridge 314 connected to I/Obus 312 provides an interface to PCI local bus 315. A number of TerminalBridges 316-317 may be connected to PCI bus 315. Typical PCI busimplementations will support four Terminal Bridges for providingexpansion slots or add-in connectors. Each of Terminal Bridges 316-317is connected to a PCI/I/O Adapter 320-321 through a PCI Bus 318-319.Each I/O Adapter 320-321 provides an interface between data processingsystem 300 and input/output devices such as, for example, other networkcomputers, which are clients to server 300. Only a single I/O adapter320-321 may be connected to each terminal bridge 316-317. Each ofterminal bridges 316-317 is configured to prevent the propagation oferrors up into the PCI Host Bridge 314 and into higher levels of dataprocessing system 300. By doing so, an error received by any of terminalbridges 316-317 is isolated from the shared buses 315 and 312 of theother I/O adapters 321, 328-329, and 336-337 that may be in differentpartitions. Therefore, an error occurring within an I/O device in onepartition is not “seen” by the operating system of another partition.Thus, the integrity of the operating system in one partition is noteffected by an error occurring in another logical partition. Withoutsuch isolation of errors, an error occurring within an I/O device of onepartition may cause the operating systems or application programs ofanother partition to cease to operate or to cease to operate correctly.

Additional PCI host bridges 322, 330, and 340 provide interfaces foradditional PCI buses 323, 331, and 341. Each of additional PCI buses323, 331, and 341 are connected to a plurality of terminal bridges324-325, 332-333, and 342-343 which are each connected to a PCI I/Oadapter 328-329, 336-337, and 346-347 by a PCI bus 326-327, 334-335, and344-345. Thus, additional I/O devices, such as, for example, modems ornetwork adapters may be supported through each of PCI I/O adapters328-329, 336-337, and 346-347. In this manner, server 300 allowsconnections to multiple network computers. A memory mapped graphicsadapter 348 and hard disk 350 may also be connected to I/O bus 312 asdepicted, either directly or indirectly. Hard disk 350 may be logicallypartitioned between various partitions without the need for additionalhard disks. However, additional hard disks may be utilized if desired.

Those of ordinary skill in the art will appreciate that the hardwaredepicted in FIG. 3 may vary. For example, other peripheral devices, suchas optical disk drives and the like, also may be used in addition to orin place of the hardware depicted. The depicted example is not meant toimply architectural limitations with respect to the present invention.

With reference now to FIG. 4, a block diagram illustrating a prior artlogically partitioned platform is depicted in accordance with thepresent invention. Logically partitioned platform 400 is an example of aplatform that, in prior art systems, may have been implemented as server104 in FIG. 1. Logically partitioned platform 400 includes partitionedhardware 430, shared single hardware 420, and operating systems 402-408.Operating systems 402-408 may be multiple copies of a single operatingsystem or multiple heterogeneous operating systems simultaneously run onplatform 400.

Partitioned hardware 430 includes a plurality of processors 432-438, aplurality of system memory units 440-446, a plurality of input/output(I/O) adapters 448-462, and a storage unit 470. Each of the processors432-438, memory units 440-446, and I/O adapters 448-462 may be assignedto one of multiple partitions within logically partitioned platform 400,each of which corresponds to one of operating systems 402-408.

Shared single hardware unit 420 includes console 422 and operator panel424. Shared single hardware unit 420 may also include other shareddevices not depicted in FIG. 4. Console 422 typically includes a displayand data entry device such as a keyboard. Console 422 allows an operatorto respond to and correct errors displayed on operator panel 424.Operator panel 424 is typically a panel display, such as an LCD display,on the front of the physical chassis of the server in which textmessages are displayed alerting an operator of potential problems withinplatform 400 or within a particular OS 402-408 running on platform 400.

Each operating system image 402-408 must share access to resourceswithin shared single hardware 420. Therefore, some of the benefits of alogically partitioned platform are lost, since each partition may accessand change the contents of shared resources, thus affecting otherpartitions within the platform. One alternative to allowing eachpartition to share access to shared single hardware 420 is to duplicatethese hardware devices and have a separate operator panel and consolefor each partition. However, such a solution is bulky and, often costprohibitive.

With reference now to FIG. 5, a block diagram of an exemplary logicallypartitioned platform is depicted in which the present invention may beimplemented. The hardware in logically partitioned platform 500 may beimplemented as, for example, server 200 in FIG. 2. Logically partitionedplatform 500 is similar to logically partitioned platform 400 in FIG. 4.However, Hypervisor 510, implemented as firmware, has been added.Firmware is “hard software” stored in a memory chip that holds itscontent without electrical power, such as, for example, read-only memory(ROM), programmable ROM (PROM), erasable programmable ROM (EPROM),electrically erasable programmable ROM (EEPROM), and non-volatile randomaccess memory (non-volatile RAM).

Hypervisor 510 provides the OS images 402-408 running in multiplelogical partitions each a virtual copy of a console and operator panel.The interface to the console is changed from an asynchronous teletypeport device driver, as in the prior art, to a set of hypervisor firmwarecalls that emulate a port device driver. The hypervisor 510 encapsulatesthe data from the various OS images onto a message stream that istransferred to a computer 580, known as a hardware system console 580.

Hardware system console 580 is connected directly to logicallypartitioned platform 500 as illustrated in FIG. 5, or may be connectedto logically partitioned platform through a network, such as, forexample, network 102 in FIG. 1. Hardware system console 580 may be, forexample, a desktop or laptop computer, and may be implemented as dataprocessing system 200 in FIG. 2. Hardware system console 580 decodes themessage stream and displays the information from the various OS images402-408 in separate windows, at least one per OS image. Similarly,keyboard input information from the operator is packaged by the hardwaresystem console, sent to logically partitioned platform 500 where it isdecoded and delivered to the appropriate OS image via the hypervisor 510emulated port device driver associated with the then active window onthe hardware system console 580.

Those of ordinary skill in the art will appreciate that the hardware andsoftware depicted in FIG. 5 may vary. For example, more or fewerprocessors and/or more or fewer operating system images may be used thanthose depicted in FIG. 5. The depicted example is not meant to implyarchitectural limitations with respect to the present invention.

With reference now to FIGS. 6A-6B, high-level flowcharts illustratingexemplary processes, performed for example, in hypervisor 510, foremulating a console and operator platform is depicted in accordance withthe present invention. The operating systems, such as, for example, OS402-408 in FIG. 4, call the hypervisor through a single entry point. Onethread of execution illustrated in FIG. 6A gets data from a perpartition buffer and sends data to the hardware system console while aseparate thread of execution illustrated in FIG. 6B receives data fromthe hardware system console.

In the first thread of execution depicted in FIG. 6A, the hypervisorreceives a request from an operating system to get or send data (step601). The hypervisor determines whether the request is a request to sendor get data (step 602). If the request is a request to send data, thenthe hypervisor determines from which OS image (partition) the receiveddata originated (step 604). The received data is then encapsulated ontoa message stream (step 606). The encapsulated data includes the messageor information received from the OS as well as the identity of the OS.The hypervisor then sends the message stream to the hardware systemconsole (step 608). If the request is a request to get data, then thehypervisor determines which OS partition requested the data (step 610).Each partition is assigned a data buffer for storing data received fromthe hardware system console until retrieved by the partition's OS. Thus,the hypervisor determines whether the requesting partition's data bufferis empty (step 612). If the data buffers for the requesting partition isempty, then the hypervisor sends a NULL message to the requesting OSimage indicating that there is no data from the hardware system consolefor the OS image to receive (step 616). If the data buffer is not empty,then the message data from the partition's data buffer is sent to therequesting OS image (step 614).

In the second thread of execution depicted in FIG. 6B, the hypervisorreceives and decodes data from the hardware system console (step 618).The hypervisor then places the decoded data into the buffercorresponding to the appropriate partition such that it may be retrievedand sent to the appropriate partition's OS image upon request (step620).

With reference now to FIG. 7, a high level flowchart illustrating anexemplary process on a hardware system console for presenting theinformation from the various OS images to an operator is depicted inaccordance with the present invention. To begin, the hardware systemconsole receives a message stream from the hypervisor (step 702). Thehardware system console decodes the message stream (step 704) anddetermines to which OS image the received data corresponds (step 706).Next, the hardware system console determines which window within thedisplay corresponds to the determined OS image (step 708) and displaysthe received data to an operator in the window corresponding to theproper OS image (step 710).

With reference now to FIG. 8, a high level flowchart illustrating anexemplary process on a hardware system console for sending messages tovarious ones of multiple OS images running on a logically partitionedplatform is depicted in accordance with the present invention. To begin,the hardware system console receives input from an operator from aninput device, such as, for example, a keyboard (step 802). The hardwaresystem console then determines which OS image corresponds to the activewindow from which the input was received (step 804). The data input,along with the OS image it corresponds with, are encapsulated into amessage stream (step 806). The message stream is then sent to thehypervisor (step 808).

It is important to note that while the present invention has beendescribed in the context of a fully functioning data processing system,those of ordinary skill in the art will appreciate that the processes ofthe present invention are capable of being distributed in the form of acomputer readable medium of instructions and a variety of forms and thatthe present invention applies equally regardless of the particular typeof signal bearing media actually used to carry out the distribution.Examples of computer readable media include recordable-type media suchas a floppy disc, a hard disk drive, a RAM, and CD-ROMs andtransmission-type media such as digital and analog communications links.

The description of the present invention has been presented for purposesof illustration and description, but is not intended to be exhaustive orlimited to the invention in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the art. Theembodiment was chosen and described in order to best explain theprinciples of the invention, the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiments with various modifications as are suited to theparticular use contemplated.

1. A logically partitioned data processing system, comprising: a processor unit; a plurality of logical partitions; a plurality of operating systems, each assigned to a separate one of the plurality of logical partitions; and a hypervisor, wherein the hypervisor provides a virtual copy of a shared hardware resource to each of the plurality of logical partitions by emulating a port device driver for each logical partition with a set of hypervisor firmware calls, and wherein the hypervisor is adapted to: a) receive first information from a first of the plurality of operating systems, wherein the first operating system is assigned to a first of the plurality of logical partitions, and provides the first information to the shared hardware resource and wherein the hypervisor identifies the first information as received from any one of the first logical partition or the first operating system, and b) receive second information from the shared hardware resource, wherein the hypervisor identifies the second information as received from any one of the first logical partition or the first operating system, wherein the hypervisor provides the second information to the first of the plurality of operating systems.
 2. The logically partitioned data processing system as recited in claim 1, wherein instructions for executing the hypervisor are contained within firmware.
 3. The logically partitioned data processing system as recited in claim 2, wherein the firmware comprises a read-only memory.
 4. The logically partitioned data processing system as recited in claim 2, wherein the firmware comprises a programmable read-only memory.
 5. The logically partitioned data processing system as recited in claim 2, wherein the firmware comprises an erasable programmable read-only memory.
 6. The logically partitioned data processing system as recited in claim 2, wherein the firmware comprises an electrically erasable programmable read-only memory.
 7. The logically partitioned data processing system as recited in claim 2, wherein the firmware comprises a non-volatile random access memory.
 8. A computer program product comprising: a computer usable storage medium including computer usable program code for a hypervisor, the computer program product including: computer usable program code for receiving a system message from one of a plurality of operating system images, wherein each operating system image in the plurality of operating system images is assigned to a separate one of a plurality of logical partitions, wherein each of a plurality of assignable resources is assigned to one of the plurality of logical partitions, and wherein shared resources are emulated and a virtual copy of the shared resources is provided to each of the plurality of logical partitions; computer usable program code for appending an operating system identity to the system message to produce a new message; and computer usable program code for sending the new message to an external data processing system.
 9. The computer program product of claim 8, wherein the shared resources comprise an operator panel.
 10. The computer program product of claim 8, wherein the shared resources comprise a system console.
 11. The computer program product of claim 8, wherein instructions for executing the hypervisor are contained within firmware.
 12. The computer program product of claim 11, wherein the firmware comprises a read-only memory.
 13. The computer program product of claim 11, wherein the firmware comprises a programmable read-only memory.
 14. The computer program product of claim 11, wherein the firmware comprises an erasable programmable read-only memory.
 15. The computer program product of claim 11, wherein the firmware comprises an electrically erasable programmable read-only memory.
 16. The computer program product of claim 11, wherein the firmware comprises a non-volatile random access memory. 